import Vue  from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const Home = ()=> import('../view/Home')
const Login = ()=> import('../view/login/Login.vue')
const phoneLogin = ()=> import('../view/login/phoneLogin.vue')
const phoneCode = ()=> import('../view/login/phoneCode.vue')

const routes = [
    {
        path:'/home',
        name:'Home',
        component:Home
    },
    {
        path:'/login',
        name:'Login',
        component:Login

    },
    {
        path:'/phoneLogin',
        name:'phoneLogin',
        component:phoneLogin

    },
    {
        path:'/getPhoneCode',
        name:'phoneCode',
        component:phoneCode
    }

]

const router  = new VueRouter({
    routes,
    mode:'history'
})

export default router